// const { defineConfig } = require('@vue/cli-service')
// const AutoImport = require('unplugin-auto-import/webpack')
// const Components = require('unplugin-vue-components/webpack')
// const { ElementPlusResolver } = require('unplugin-vue-components/resolvers')
//
// module.exports = defineConfig({
//   publicPath:'./',
//   transpileDependencies: true,
//   lintOnSave:false,
//   configureWebpack:config=>{
//     config.plugins.push(AutoImport({
//       resolvers: [ElementPlusResolver()],
//     }))
//     config.plugins.push(Components({
//       resolvers: [ElementPlusResolver()],
//     }))
//   },
//   // devServer:{
//   //   proxy: {
//   //     '/api': {                              //需要代理的接口
//   //       target: 'http://localhost:80',//springboot的端口号
//   //       changeOrigin: true,             //是否跨域
//   //       ws: true,                      //是否代理 websockets
//   //       secure: true,                   //是否https接口
//   //       pathRewrite: {                  //路径重置
//   //         '^/api': ''
//   //       }
//   //     },
//   //   }
//   // }
// })
// webpack.config.js
const AutoImport = require('unplugin-auto-import/webpack')
const Components = require('unplugin-vue-components/webpack')
const { ElementPlusResolver } = require('unplugin-vue-components/resolvers')

module.exports = {
  assetsDir: 'static',
  parallel: false,
  publicPath: './',
  transpileDependencies: true,
  lintOnSave: false,
  configureWebpack:{
    plugins: [
      AutoImport({
        resolvers: [ElementPlusResolver()],
      }),
      Components({
        resolvers: [ElementPlusResolver()],
      }),
    ],
  },
  devServer:{
    port: 8081,
  }

}
